#undef ENUM_BEGIN
#undef ENUM_END
#undef ENUM_ELEM
#undef ENUM_ELEM_SETVAL
#undef ENUM_ELEM_SETTR
#undef ENUM_ELEM_SETVALTR

#ifndef LIT_API
#include <LitPrerequisites.h>
#endif

#if !defined(GENERATE_ENUM_STRINGS)
	#define ENUM_BEGIN(ENUM_NAME) typedef enum LIT_API_EXPORT_ONLY tag##ENUM_NAME
	#define ENUM_ELEM( ELEM ) ELEM
	#define ENUM_ELEM_SETVAL( ELEM, VAL ) ELEM=VAL
	#define ENUM_ELEM_SETTR( ELEM, TR ) ELEM
	#define ENUM_ELEM_SETVALTR( ELEM, VAL, TR ) ELEM=VAL
	#define ENUM_END(ENUM_NAME) ENUM_NAME; \
		LIT_API_EXPORT_ONLY const char * tr##ENUM_NAME( enum tag##ENUM_NAME id ); \
		LIT_API_EXPORT_ONLY size_t count##ENUM_NAME( )
#else
	#define ENUM_BEGIN(ENUM_NAME) LIT_API_EXPORT_ONLY const char * _tr##ENUM_NAME[] = 
	#define ENUM_ELEM( ELEM ) #ELEM
	#define ENUM_ELEM_SETVAL( ELEM, VAL ) #ELEM
	#define ENUM_ELEM_SETTR( ELEM, TR ) TR
	#define ENUM_ELEM_SETVALTR( ELEM, VAL, TR ) TR
	#define ENUM_END(ENUM_NAME) ; \
		LIT_API_EXPORT_ONLY const char * tr##ENUM_NAME( enum tag##ENUM_NAME id ){ return _tr##ENUM_NAME[id]; } \
		LIT_API_EXPORT_ONLY size_t count##ENUM_NAME( ){return (sizeof(tag##ENUM_NAME)/sizeof((tag##ENUM_NAME)0)); } \
	
#endif
